	<!-- /* Description for file.
 * 职位管理
 *
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/recruitpositions
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    张海杰2011年0618
 * @lastmodified  张海杰2011年0623
 */-->
 
 
 <script language="javascript">
var delurl="<?php echo $deleteurl; ?>";
</script>
<script language="javascript">
var editurl="<?php echo $editurl; ?>";
</script>
<script language="javascript">
var addurl="<?php echo $addurl; ?>";
</script>
<script language="javascript">
var data=<?php echo $data; ?>;
</script>
<script language="javascript">
var disbutton=<?php echo $javascript->object($disbutton);?>;
</script>
<script language="javascript">
var title2="<?php echo $title2; ?>";
</script>
<?php echo $javascript->link('jquery-1.4.2');?>
<script language="javascript">
function button(com,grid,url)  
{  
	var ids=$("#flex").getCheckedRows();
	if(com=="delete")
	{
		var pids="";
		if(ids.length==0)
		{
			alert("请选择你要删除的项");
			return;
		}
		for(i=0;i<ids.length;i++)
        {
        	pids=pids+ids[i]+"/";
        }
		if(!confirm("确定删除?"))
			return;
		$.ajax({
            type: "post",
            url: url,
            data: {id:pids},
            dataType:"json",
            success: function(data) {
            $(".clearckeck").trigger("click");
			$(".pReload").trigger("click");
			$(".notice").html(data.message); 
			},
            error: function(data) {
				$(".clearckeck").trigger("click");
				$(".pReload").trigger("click");
				$(".notice").html('data.message');
			}
        });
	}
	else if(com=="add")
	{
		window.open(url);
	}
	else if(com=="edit")
	{
		if(ids.length!=1)
		{
			alert("请选择一个选项");
		}
		else
		{
			var seid=ids[0];
			var eurl=url+"?id="+seid;
			window.open(eurl,'mainFrame2');
		}
	}
	else
	{
		var pix=com.substring(0,2);
		switch (pix)
		{
			case "aj":
				var pids="";
				if(ids.length==0)
				{
					alert("请选择选项");
					return;
				}
				for(i=0;i<ids.length;i++)
		        {
		        	pids=pids+ids[i]+"/";
		        }
				$.ajax({
		           type: "post",
		           url: url,
		            data: {id:pids},
		            dataType:"json",
		            success: function(data) {
					$(".pReload").trigger("click");
					$(".notice").html(data.message); 
					},
		            error: function(data) {
						$(".clearckeck").trigger("click");
						$(".pReload").trigger("click");
						$(".notice").html('data.message');
					}
		        });
				break;
			case "up":
				if(ids.length!=1)
				{
					alert("请选择一个选项");
				}
				else
				{
					var seid=ids[0];
					var eurl=url+"?id="+seid;
					window.open(eurl,'mainFrame2');
				}
				break;
			default:
				window.open(url,'mainFrame2');
		}
	}
}
</script>
<script type="text/javascript">
var b='';
/*[{
	name:'add',
	displayname : '添加',
	tp : '<?php echo ROOT_WEB_PATH; ?>/app/webroot/css/images/icons/add.png',
	bclass : 'add',
	onpress : button,
	display:disbutton.add,
	url:addurl
},
{
	// 设置分割线
	separator : true,
	display:disbutton.del
},
{
	name:'delete',
	displayname : '删除',
	tp : '<?php echo ROOT_WEB_PATH; ?>/app/webroot/css/images/icons/delete.png',
	bclass : 'delete',
	onpress : button,
	display:disbutton.del,
	url:delurl
},
{
	// 设置分割线
	separator : true,
	display:disbutton.del
},
{
	name:'edit',
	displayname : '更新',
	tp : '<?php echo ROOT_WEB_PATH; ?>/app/webroot/css/images/icons/edit.png',
	bclass : 'add',
	onpress : button,
	display:disbutton.edit,
	url:editurl
},
{
	// 设置分割线
	separator : true,
	display:disbutton.edit
}];*/
</script>
<script type="text/javascript">
var ob=<?php echo $ob;?>;
if(ob.length==0)
{
	
}
else
{
	for(i=0;i<ob.length;i++)
	{
		var l=b.length;
		b[l]=ob[i];
	}
}
</script>
<?php
	echo $html->css('flexigrid');
	echo $html->css('start/jquery-ui-1.8.2.custom');
	
	echo $javascript->link('jquery');
	echo $javascript->link('flexigrid/flexigrid'); 
	echo $javascript->link('statisticsinfo');
	//echo $javascript->link('DatePicker/WdatePicker');
	echo $javascript->link('jquery-ui-1.8.2.custom.min');
	echo $html->css ( 'style' );
?>
<script type="text/javascript">
	$(function(){
		$(".datepickerSpan :input").datepicker({
			inline: true
		});
		 $('.datepickerSpan :input').datepicker('option', {dateFormat: "yy-mm-dd"});
		 $('.datepickerSpan :input').datepicker( "option", "closeText", 'X' );
	});

	//选择用户提交
	 $(function()
	 		{
			 	$("#bb").click(function(){
	 				$(".toolbarStyletopositon").toggle();
				});
	 			$("#addallowperson").click(function(){		
	 				getDelStr();
	 				$(".toolbarStyletopositon").toggle();
	 			});
	 			$("#closeallowperson").click(function(){		
					$(".toolbarStyletopositon").toggle();
				});
	 		});

	 //用来将选中的用户拼接起来
	 function getDelStr() {
	 	var delArr = $("input[name='recuit']:checkbox:checked");
	 	if(delArr.length==0)
	 	{
	 		alert("请选择用户!");
	 		return;
	 	}
	 	var str = "";
	 	for(var i=0;i<delArr.length;i++) {
	 		var del = delArr[i].value;
	 		str += del;
	 		str += ",";
	 	}
	 	str=str.substr(0,str.length-1);
	 	$("#positions").val(str);
	 }

	 function mycheck()
	 {
		 var delArr = $("input[name='projectss']:checkbox:checked");
		 var str = "";
		 for(var i=0;i<delArr.length;i++) {
		 	var del = delArr[i].value;
		 	str += del;
		 	str += ",";
		 }
		 if(str!="")
		 {
		 	str=str.substr(0,str.length-1);
		 }
		 else
		 {
			 str="1=2 ";
		 }
		 $("#projectStatue").val(str);
	}
</script>
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Recruitposition Report');//一级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('Position Report',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->

<!--                                          按钮区域-->
<script type="text/javascript">
$(function(){
	$("#bt_6").click(function () {
		//$(".bt6").click();
		button('op','','<?php echo ROOT_WEB_PATH;?>/outputexcels/statistics');
	});
});
</script>
<div class="buttonbg">
<a class="btn4" id="bt_6">导出Excel</a>   <!-- 一个中文字12px宽 a的宽根据按钮内容设 -->
</div>
<!--                                         按钮区域--> 


<!--                                                                           查询区域-->
<div class="tabflex" id="selectview">
<fieldset><legend><?php echo __('Position Report');?></legend>
<?php if (count($searchitems)>0)
{
	$j=0;
	echo "<form class='searchform' name='searchform' action='#' onsubmit='return mycheck();'>";
	echo "项目状态:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
	foreach($op1 as $k=>$v)
	{
		echo "<input type='checkbox' name='projectss'  id='projectss' value='".$v."' checked/>";
		echo $v;
	}
	echo "<input type='hidden' name='projectStatue' class='sitems' id='projectStatue'/>";
	echo "<br>";
	for ($i=0;$i<count($searchitems);$i++)
	{
		$item=$searchitems[$i];

		if ($item['type']=="text")
		{
			echo $item['lable']."<input type='text' name='".$item['name']."' class='sitems' id='".$item['id']."'></input>";
		}
		elseif ($item['type']=="select")
		{
			echo $item['lable']."<select name='".$item['name']."' class='sitems' id=".$item['id'].">";
			foreach ($item['op'] as $k=>$v)
			{
				echo "<option value='$v'>$k</option>";
			}
			echo "</select>";
		}
		elseif ($item['type']=="checkbox")
		{
			echo "<input type='checkbox' name='".$item['name']."' class='oksubmit' id=".$item['id']. "value=".$item['value']." ></input>".$item['lable'];
		}
		elseif ($item['type']=="button")
		{
			echo $item['lable']."<input type='button' value='".$item['value']."' class='sitems' style='width:66px;background-repeat:no-repeat;background-image: url(../image/btn75.gif);' id='".$item['id']."'></input>";
		}
		elseif ($item['type']=="date")
		{
			echo $item['lable'];?><span class="datepickerSpan"><input type='text' name="<?php echo $item['name']?>" class='sitems' id="<?php echo $item['id'];?>" value="<?php if(@$item['value']!=''){ echo $item['value'];}?>"/></span>
			
		<?php 
		}
		if ($item['br'])
		{
			echo "<br>";
		}
	}
}
?>
<div class="toolbarStyletopositon" style="display:none">
<ul>
	<?php 
		foreach ($res as $eachrecord)
		{
			echo "<li style='height:auto;'>";
			echo $form->checkbox($eachrecord['Recruitposition']['name'], array('value' => $eachrecord['Recruitposition']['name'],'name'=>'recuit'));
			echo $eachrecord['Recruitposition']['name'];
			echo "</li>";
		}
	?>
</ul>
<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left;height:20px;">
	<tr>
		<td width="50"></td>
		<td width="100"><?php echo $form->button('确定',array('class'=>'oksubmit','id'=>'addallowperson'));?>  <!-- __('reset', true)取消-->
		<td width="100"><?php echo $form->button('关闭',array('class'=>'cancelbutton','id'=>'closeallowperson'));?>  <!-- __('reset', true)取消-->
	</tr>
</table>
</div>
<?php 
echo "<br><input type='submit' class='btn4' value='生成报表'/>";
echo "</form>";
?>
</fieldset>
</div>
<!--                                                                           查询区域-->
<!--                                                                           表格-->
<div class="tabflex">
<table id="flex" style="display: none"></table><br></br>
</div>
<!--                                                                           表格-->



